<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示图片</title>
    {% load static %}
</head>
<body>
    <h2>显示图片</h2>
    <hr>

    <p>当前用户：{{ user.name }}</p>
    <img src="{% static user.icon %}">

    <hr>
    <h3>{{ user.name }}的相册</h3>
    {% for photo in user.photomodel_set.all %}
        <img src="{% static photo.img %}">
        
    {% endfor %}

</body>
</html>